import { useMemo } from 'react'
import { useAntdConfig } from '@umijs/max'
import {theme} from 'antd'
const {darkAlgorithm} = theme
export default function useIsDrak() {
    const antdConfig = useAntdConfig();
    return useMemo(()=>{
        return antdConfig?.theme?.algorithm?.includes(darkAlgorithm)
    },[()=>antdConfig?.theme?.algorithm])

}